package com.petshop.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @TableName posts
 */
@TableName(value = "posts")
@Data
public class Posts implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "post_id", type = IdType.AUTO)
    private Integer postId;
    private Integer userId;
    private String title;
    private String author;
    private String description;
    private String content;
    private String imageUrl;
    private Integer liked;
    private Date createdAt;
    private Date updatedAt;
    @Version
    private Integer version;
    @TableLogic
    private Integer deleted;
    //判断当前用户是否点赞，true表示已点赞
    @TableField(exist = false)
    private Boolean isLike;
}